package com.xrkj.b2c.service.impl.sys;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xrkj.b2c.dao.sys.SysPrivilegeMapper;
import com.xrkj.b2c.model.sys.SysPrivilege;
import com.xrkj.b2c.service.sys.SysPrivilegeService;

/**
 * 
 * <B>系统名称：</B>权限服务<BR>
 * <B>模块名称：</B><BR>
 * <B>中文类名：</B><BR>
 * <B>概要说明：</B><BR>
 * @author 赵子靖
 * @since 2018年07月15日
 */
@Service
public class SysPrivilegeServiceImpl implements SysPrivilegeService {
    @Autowired
    private SysPrivilegeMapper privilegeDao;

    @Override
    public int deletePrivilege(String id) {
        return privilegeDao.deleteByPrimaryKey(id);
    }

    @Override
    public int insertPrivilege(SysPrivilege privilege) {
        return privilegeDao.insertSelective(privilege);
    }

    @Override
    public int updatePrivilege(SysPrivilege privilege) {
        return privilegeDao.updateByPrimaryKeySelective(privilege);
    }

    @Override
    public SysPrivilege selectByPrimaryKey(String id) {
        return privilegeDao.selectByPrimaryKey(id);
    }

    @Override
    public Integer findPrivilegeTotal(Map<String, Object> paramter) {
        return privilegeDao.findPrivilegeTotal(paramter);
    }

    @Override
    public List<SysPrivilege> findPrivilegeList(Map<String, Object> paramter) {
        return privilegeDao.findPrivilegeList(paramter);
    }

}
